#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int Fac(int n)
{
	if (n == 0)
	{
		return 1;
	}
	int ret = 1;
	for (int i = 1; i <= n; i++)
	{
		ret *= i;
	}
	return ret;
}

int main()
{
	int n = 0;
	scanf("%d", &n);
	printf("%d", Fac(n));
	return 0;
}